package priv.pattern.builder;

import org.junit.Test;

/*
 * 作者：m鹏h
 * 时间；2024/6/1 17:45
 * 描述：建造者模式 客户端
 **/
public class BuilderMealTest {

    @Test
    public void test() {
        BuilderMeal builderMeal = new BuilderMeal();
        Meal meal = builderMeal.meal1();
        System.out.println("第一个套餐");
        meal.mealInfo();
        System.out.println("总花费：" + meal.computeCost());

        System.out.println();
        System.out.println("------------------");
        System.out.println();

        Meal meal2 = builderMeal.meal2();
        System.out.println("第二个套餐");
        meal2.mealInfo();
        System.out.println("总花费：" + meal2.computeCost());

        System.out.println();
        System.out.println("------------------");
        System.out.println();

        Meal meal3 = builderMeal.meal3();
        System.out.println("第三个套餐");
        meal3.mealInfo();
        System.out.println("总花费：" + meal3.computeCost());

    }


}
